'use strict'


import Http from '../kit/HttpKit'
import Api from './Api'

const URL_AUTH_LIST = Api.API_URL + '/company/authList'
const URL_CHECK_STATUS_PASS = Api.API_URL + '/company/checkStatusPass'
const URL_CHECK_STATUS_FAIL = Api.API_URL + '/company/checkStatusFail'
const URL_CHECK_STATUS_ING = Api.API_URL + '/company/checkStatusIng'

/**
* 工厂模块
**/
const authList = (data, callback)=>{
	var url = Api.API_URL + '/company/authList';

	data.api_token = Api.getApiToken();
	data.api_user_id = Api.getApiUserId();

	Http.post(url, data, json=>{
		Api.getDataCB(json, callback);
	});
}

const authDetail = (accountId, callback)=>{
	var url = Api.API_URL + '/company/authDetail';

	let data = {accountId: accountId};
	data.api_token = Api.getApiToken();
	data.api_user_id = Api.getApiUserId();

	Http.post(url, data, json=>{
		Api.getDataCB(json, callback);
	});
}

export default{
	authList, authDetail,
	URL_AUTH_LIST, URL_CHECK_STATUS_PASS, URL_CHECK_STATUS_FAIL, URL_CHECK_STATUS_ING
}
